package com.bjc.platform.model;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 系统的日志对象
 */
@Entity
@Table(name = "adm_logs")
public class AdmLog implements Serializable {

	private static final long serialVersionUID = 2295435948986798209L;

	private Long id;
	private Long userId;
	private String source; // ip
	private String eventNo; // 目前为空
	private String type; // INFO, WARN, ERROR
	private String url; // 请求地址
	private String funcName; // 功能名称 (未记)
	private String data; // 请求参数
	private String description; // 事件描述
	private String remark; // 备注
	private Date logTime; // 记录时间

	@Id
	@Column(name = "id", columnDefinition="int")
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "log_time")
	public Date getLogTime() {
		return logTime;
	}

	public void setLogTime(Date logTime) {
		this.logTime = logTime;
	}

	@Column(length=500)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name="user_id", columnDefinition="int")
	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId ) {
		this.userId = userId;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	@Column(name = "event_no")
	public String getEventNo() {
		return eventNo;
	}

	public void setEventNo(String eventNo) {
		this.eventNo = eventNo;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(length=500)
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(columnDefinition="text")
	public String getData() {
		return data;
	}

	@Column(name = "func_name")
	public String getFuncName() {
		return funcName;
	}

	public void setFuncName(String funcName) {
		this.funcName = funcName;
	}

	public void setData(String data) {
		this.data = data;
	}

	@Column(columnDefinition="longtext")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}